; EXPECT: sat
(set-option :incremental false)
(set-logic ALL)

(declare-fun x () (Relation Int Int))
(declare-fun y () (Relation Int Int))
(declare-fun e () Int)
(declare-fun a () (Tuple Int Int))
(assert (= a (tuple 1 e)))
(declare-fun d () (Tuple Int Int))
(assert (= d (tuple e 5)))
(assert (set.member a x))
(assert (set.member d x))
(assert (not (set.member (tuple 1 1) x)))
(assert (not (set.member (tuple 1 2) x)))
(assert (not (set.member (tuple 1 3) x)))
(assert (not (set.member (tuple 1 4) x)))
(assert (not (set.member (tuple 1 5) x)))
(assert (not (set.member (tuple 1 6) x)))
(assert (not (set.member (tuple 1 7) x)))
(assert (= y (rel.tclosure x)))
(assert (set.member (tuple 1 5) y))
(check-sat)
